import request from '@/utils/request';
// 登录
export function login (data) {
  return request({
    url: 'v1/login',
    method: 'post',
    data
  });
}
// 获取资料
export function getInfo (token) {
  return request({
    url: 'v1/user/info',
    method: 'get',
    params: { token }
  });
}
// 编辑资料
export function editInfo (data) {
  return request({
    url: '/v1/edit',
    method: 'POST',
    data
  });
}
// 退出登录
export function logout (token) {
  return request({
    url: '/v1/logout',
    method: 'post',
    params: { token }
  });
}
// 菜单列表
export function menuList (params) {
  return request({
    url: 'v1/menu/list',
    method: 'get',
    params
  });
}

// 会员详情
export function userDetail (params) {
  return request({
    url: 'v1/user/detail',
    method: 'get',
    params
  });
}

